﻿<%@ Page Language="C#" MasterPageFile="~/Admin/PMAdmin.Master" AutoEventWireup="true" CodeBehind="TradesOverview.aspx.cs" Inherits="PM.Site.Admin.TradesOverview" %>


<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div>
        <asp:Label ID="lblMsg" runat="server" Text="" Visible="false"></asp:Label>
    </div>
    <div>
        <asp:Button ID="btnAdd" runat="server" Text="Add" OnClick="btnAdd_Click" />
    </div>
    
    <div style="float: left;">
        <asp:Panel ID="pnlOverviewTrades" runat="server" Font-Size="Medium" GroupingText="Overview Trades">
            <div style="padding: 5px;">
                <asp:DataList ID="dlTrades" runat="server" Visible="true"
                    RepeatDirection="Horizontal" CellPadding="0" CellSpacing="0" Font-Size="Smaller"
                    ItemStyle-BackColor="#F6F4F5" ItemStyle-BorderColor="#6B6B6B"
                    ItemStyle-BorderWidth="1px" HeaderStyle-BackColor="#444444" HeaderStyle-Height="30px"
                    RepeatColumns="1" RepeatLayout="Flow" OnItemCommand="dlTrades_ItemCommand">
                    <AlternatingItemStyle BackColor="#F9F9F9" />
                    <HeaderTemplate>
                        <div style="padding-bottom: 0px; height: 30px; margin: 0px; color: White;">
                            <div style="width: 60px; float: left; text-align: center; font-weight: bold; padding-left: 2px;">
                                Trade Date</div>
                            <div style="width: 140px; float: left; text-align: center; font-weight: bold; padding-left: 2px;">
                                Trade Time</div>
                            <div style="width: 125px; float: left; text-align: center; font-weight: bold; padding-left: 2px;">
                                Buy Or Sell</div>
                            <div style="width: 50px; float: left; text-align: center; font-weight: bold;">
                                Execution Id</div>
                            <div style="width: 60px; float: left; text-align: center; font-weight: bold;">
                                Company Id</div>
                            <div style="width: 150px; float: left; text-align: center; font-weight: bold;">
                                Main Type</div>
                            <div style="width: 80px; float: left; text-align: center; font-weight: bold;">
                                Sub Type</div>
                            <div style="width: 100px; float: left; text-align: center; font-weight: bold;">
                                Quantity</div>
                            <div style="width: 120px; float: left; text-align: center; font-weight: bold;">
                                Price</div>                            
                            <div style="width: 50px; float: left; text-align: center; font-weight: bold;">
                                Edit</div>
                        </div>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <div style="float: left; margin-bottom: 0px; min-height: 15px; font-size: smaller;
                            width: 1660px;">
                            <div style="width: 60px; float: left; text-align: center; min-height: 12px; padding-left: 2px;">
                                <label>
                                    <%# Eval("TradeDate")%></label></div>
                            <div style="width: 140px; float: left; text-align: center; min-height: 12px; padding-left: 2px;">
                                <label>
                                    <%# Eval("TradeTime")%></label></div>
                            <div style="width: 125px; float: left; text-align: center; min-height: 12px; padding-left: 2px;">
                                <label>
                                    <%# Eval("BuySell")%></label></div>
                            <div style="width: 50px; float: left; text-align: center; min-height: 12px;">
                                <label>
                                    <%# Eval("ExecutionId")%></label></div>
                            <div style="width: 60px; float: left; text-align: center; min-height: 12px;">
                                <label>
                                    <%# Eval("CompanyId")%></label></div>
                            <div style="width: 150px; float: left; text-align: center; min-height: 12px;">
                                <label>
                                    <%# Eval("MainType")%></label>
                            </div>
                            
                            <div style="width: 100px; float: left; text-align: center; min-height: 12px;">
                                <label>
                                    <%# Eval("SubType")%></label></div>
                            <div style="width: 120px; float: left; text-align: center; min-height: 12px;">
                                <label>
                                    <%# Eval("Quantity")%></label></div>
                            <div style="width: 40px; float: left; text-align: center; min-height: 12px;">
                                <label>
                                    <%# Eval("Price")%></label></div>
                                    
                            <div style="width: 50px; text-align: center; vertical-align: top; float: left;">
                                <asp:ImageButton ID="imgEdit" CommandName="EditTrade" CommandArgument='<%# String.Format("{0},{1},{2},{3}", Eval("TradeDate"), Eval("TradeTime"), Eval("BuySell"), Eval("ExecutionId")) %>'
                                    ImageUrl="~/Images/Edit.gif" runat="server" AlternateText="Edit Trade" />
                            </div>
                            
                        </div>
                    </ItemTemplate>
                </asp:DataList>
            </div>
        </asp:Panel>
    </div>

</asp:Content>
    
    